package thread;

import static java.lang.Thread.sleep;

public class ThreadDemo1 {
    public static void main(String[] args) throws InterruptedException {
        //创建出线程实例
        Thread t = new MyThread();
        //调用 Thread 的start方法, 才会真正调用系统api, 在系统中创建出线程
        t.start();

        while (true) {
            System.out.println("hello main");
            sleep(1000);
        }
    }
}
